Queues are mechanisms for buffing and storing information, and are used widely within computer science. One example is a work queue that may be accessed by multiple processes or threads. Such a queue may be a first in, first out (FIFO) queue where multiple producer threads may place items in the queue and multiple consumer threads may retrieve items to process.
Some queues employ locks to ensure that one and only one process may enqueue or dequeue at a time. Locking queues can lead to a blocking condition where the queue does not become unlocked if the process that is enqueuing or dequeuing does not finish properly and leaves the queue in a locked state.